import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 牛客网.简单题.动态字符串
 */

class Main {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        String str = scanner.next();

        //write your code here......
        StringBuffer s = new StringBuffer(str);
        s.reverse();
        StringBuffer s2 = new StringBuffer();
        for(int i = 0; i < s.length(); i += 3) {
            if(i + 3 < s.length()){
                s2.append(s,i,i + 3);
                s2.append(",");
            } else {
                s2.append(s,i,s.length());
            }
        }
        s2.reverse();
        System.out.println(s2.toString());
    }
}

public class Test {
}
